#ifndef LKHWINDOW_H
#define LKHWINDOW_H

#include <QMainWindow>
#include "housingdbms.h"
#include "dlgsettings.h"
#include "developarea.h"
#include "dlgabout.h"
#include "formworkwindow.h"
#include "apnavtreemodel.h"
#include "formtown.h"
#include "formpeople.h"
#include "formdecmasters.h"
#include "formleases.h"
#include "formgetreceipt.h"
#include "modelcontainer.h"
#include "formpayments.h"
#include "formreports.h"

namespace Ui {
    class LKHWindow;
}

class LKHWindow : public QMainWindow
{
    Q_OBJECT
protected:
    DevelopArea *mp_develop;
    DlgSettings *mp_settings_dlg;
    DlgAbout    *mp_about_dlg;


    HousingSettings m_hs;
    HousingDBMS     *mp_dbms;
    ModelContainer *mp_models;

    FormGetReceipt  *mp_get_receipt;

    FormWorkWindow *mp_work_window;

    FormTown    *mp_town_editor;
    FormPeople *mp_people_editor;
    FormDecMasters *mp_decmaster_editor;
    FormLeases          *mp_leases_editor;
    FormPayments     *mp_payments;
    FormReports     *mp_reports;


    void show_work_widget(QWidget *pWidget,const QString & qstr_title);
public:
    explicit LKHWindow(QWidget *parent = 0);
    ~LKHWindow();

private slots:
    void on_qact_edit_settings_activated();

    void on_qact_exit_activated();

    void on_qact_connect_activated();

    void on_qact_show_develop_area_activated();

    void on_qact_about_activated();

    void get_msg(QString);

    void get_error_msg(QString);

    void get_fast_msg(QString);

    void on_qact_receipt_activated();

    void on_qact_town_activated(int );

    void on_qact_tenants_activated(int );

    void on_qact_leases_activated(int );

    void on_qact_decmasters_activated(int );

    void on_qact_payments_activated(int );

    void on_qact_reports_activated();

private:
    Ui::LKHWindow *ui;
};

#endif // LKHWINDOW_H
